<?php
C_base::Dy('c.kefu.kfbase');
class fankui extends kfbase{

	var $_vpath='kefu/fankui/';  //定义调用模板所属一级文件夹
	function __construct(){
		parent::__construct();
		$this->title='反馈管理';
	}
	
	//投诉-首页
	function tousu(){
		$this->title = '投诉管理';
		$this->xw = C_base::M('kefu.fankui')->tousu_ss(array());
		if($this->xw){
			$this->xwnum = count($this->xw);
		}else{
			$this->xwnum = 0;
		}
	}
	
	//投诉-详情
	function tousu_xx(){
		$w = array('id'=>$this->_get('id'));
		$this->r = C_base::M('kefu.fankui')->tousu_s($w);
	}
	
	//投诉-更改状态
	function tszt(){
		$this->_is_html = 1;
		extract($this->_post());
		$w = array('id'=>$id);
		$u = array('zt'=>1);
		$r = C_base::M('kefu.fankui')->tousu_u($w,$u);
		if($r == '1'){
			//发送通知给用户
			
			
			exit('cg');
		}else{
			exit('error');
		}
	}
	
	//投诉-写入
	function tousu_c(){
		$this->_is_html = 1;
		extract($this->_post());
		$c = array('uid'=>8,'content'=>$content,'time'=>time());
		$r = C_base::M('kefu.fankui')->tousu_c($c);
		if($r > 0){
			exit('cg');
		}else{
			exit('error');
		}
	}
	
	//建议-首页
	function jianyi(){
		$this->title = '建议管理';
		$this->xw = C_base::M('kefu.fankui')->jianyi_ss(array());
		if($this->xw){
			$this->xwnum = count($this->xw);
		}else{
			$this->xwnum = 0;
		}
	}
	
	//建议-写入
	function jianyi_c(){
		$this->_is_html = 1;
		extract($this->_post());
		$c = array('uid'=>8,'content'=>$content,'time'=>time());
		$r = C_base::M('kefu.fankui')->jianyi_c($c);
		if($r > 0){
			exit('cg');
		}else{
			exit('error');
		}
	}
	
	//建议-详情
	function jianyi_xx(){
		$w = array('id'=>$this->_get('id'));
		$this->r = C_base::M('kefu.fankui')->jianyi_s($w);
	}
	
	//建议-更改状态
	function jyzt(){
		$this->_is_html = 1;
		extract($this->_post());
		$w = array('id'=>$id);
		$u = array('zt'=>1);
		$r = C_base::M('kefu.fankui')->jianyi_u($w,$u);
		if($r == '1'){
			//发送通知给用户
			
			
			exit('cg');
		}else{
			exit('error');
		}
	}
}
/*********************************************************************文件已结束*****************************************************************/